/*
 * @Author: typ
 * @Date: 2025-01-15 10:04:58
 * @LastEditors: typ
 * @LastEditTime: 2025-02-17 11:17:25
 * @FilePath: /720view/vite/plugins/index.js
 * @Description: 
 */
import vue from '@vitejs/plugin-vue'
import cesium from 'vite-plugin-cesium'

import createAutoImport from './auto-import'
import createCompression from './compression'
import createSetupExtend from './setup-extend'

export default function createVitePlugins(viteEnv, isBuild = false) {
    const vitePlugins = [
        vue(),
        cesium()
    ]
    vitePlugins.push(createAutoImport())
    vitePlugins.push(createSetupExtend())
    isBuild && vitePlugins.push(...createCompression(viteEnv))
    return vitePlugins
}
